package iohomework;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;

public class OISDemo {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        FileInputStream fis=new FileInputStream("zy.txt");
        ObjectInputStream ois=new ObjectInputStream(fis);
        Student zy=(Student)ois.readObject();
        System.out.println(zy);
        ois.close();
    }
}
